#ifndef APPEALITEMWIDGET_H
#define APPEALITEMWIDGET_H

#include <QWidget>
#include <QLabel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QFont>
#include <QRandomGenerator>
#include <QStringBuilder>
#include <QPushButton>
#include <QMessageBox>
#include <QMouseEvent>
#include "component/item/AvatarLabel.h"
#include "dataModel/Appeal.h"

class AppealItemWidget : public QWidget
{
    Q_OBJECT
public:
    explicit AppealItemWidget(QWidget *parent = nullptr,
                              const QString &username = "匿名用户",
                              const QString &time = "1970.01.01 00:00",
                              const QString &appeal = QString());
    void quickSetup(const Appeal &appeal);

private:
    AvatarLabel *avatar;
    QLabel *usernameLabel;
    QLabel *timeLabel;
    QLabel *appealLabel;

protected:
    void mousePressEvent(QMouseEvent *event) override; // 重写鼠标按下事件

signals:
    void openMyPage();
};

#endif // APPEALITEMWIDGET_H
